<%--
  Created by IntelliJ IDEA.
  User: wgh
  Date: 2021/11/17
  Time: 9:59
  To change this template use File | Settings | File Templates.
--%>

<%@ page language="java" contentType="text/html; charset=utf-8"
         pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://"
            + request.getServerName() + ":" + request.getServerPort()
            + path + "/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>挂号列表</title>
    <link href="<%=basePath%>css/style.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="<%=basePath%>js/jquery.min.js"></script>
    <script type="text/javascript">
        function deletes(roid){
            if (confirm("您确定要删除此挂号单的信息吗？")) {
                window.location.href = "<%=basePath%>deleteRoController?roid="+roid;
            }
        }

    </script>
    <style type="text/css">
        body {
            background:#FFF
        }
    </style>
</head>
<body>
<div id="contentWrap">
    <!--表格控件 -->
    <form action="<%=basePath%>roListController" method="post" name="form1">
        <div id="widget table-widget">
            <div class="pageTitle">挂号管理</div>
            <div class="querybody">
                <ul class="seachform">
                    <li><label>挂号号</label><input name="roid" type="text" class="scinput" value="${roid }"/></li>
                    <li><label>会员ID</label><input name="memberid" type="text" class="scinput" value="${memberid }"/></li>
                    <li><label>科室</label><input name="deptname" type="text" class="scinput" value="${deptname }"/></li>
                    <li><label>&nbsp;</label><input name="" type="submit" class="scbtn" value="查询"/></li>
                </ul>
            </div>
            <div class="pageColumn">
                <div class="pageButton"><a href="<%=basePath%>ro/ghadd.jsp"><img src="images/t01.png" title="新增"/></a><span>挂号列表</span></div>                <table>
                <thead>
                <th width="">挂号号</th>
                <th width="">会员ID</th>
                <th width="">科室</th>
                <th width="">医生</th>
                <th width="">挂号费用</th>
                <th width="">挂号时间</th>
                <th width="">操作时间</th>
                <th width="10%">操作</th>
                </thead>
                <tbody>
                <c:forEach items="${roList}" var="ro">
                    <tr>
                        <td>${ro.roid }</td>
                        <td>${ro.memberid }</td>
                        <td>${ro.deptname }</td>
                        <td>${ro.docname }</td>
                        <td>${ro.ghfy }</td>
                        <td>
                            <fmt:formatDate value="${ro.rotime}" pattern="yyyy-MM-dd"/>
                        </td>
                        <td>
                            <fmt:formatDate value="${ro.optime}" pattern="yyyy-MM-dd"/>
                        </td>

                        <td>
                            <a onclick="deletes('${ro.roid}')"><img src="<%=basePath%>images/icon/del.png" width="16" height="16" /></a>
                        </td>
                    </tr>
                </c:forEach>
                </tbody>
            </table>
            </div>
        </div><!-- #widget -->

    </form>
</div>
</body>
</html>
